package com.msw.axon.repository;

import com.msw.axon.model.Teacher;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.transaction.annotation.Transactional;

/**
 * Created by hadoop on 17-5-13.
 */
public interface TeacheerRepo  extends JpaRepository<Teacher, Long> {

    @Modifying
    @Transactional
    @Query("update Teacher t set t.zhicheng='abc', t.name='qqqq_abc' where t.id=?1")
    int update(Long id);

}
